<template>
  <div class="demo">
    <h1>{{name}}</h1>
    <h2>{{address}}</h2>
    <button @click="showName">点我alert名称</button><button @click="showInput">点我打印input内容</button><br>
    <input type="text" ref="input">
  </div>
</template>

<script>
// import { showName } from '../mixin'

export default {
  name: 'SchoolView',
  data() {
    return {
      name: '清华大学',
      address: '北京'
    }
  },
  methods: {
    showInput() {
      console.log(this.$refs, this.$refs.input.value)
    },
  },
  // mixins: [showName]
}
</script>

<style scoped>
  .demo {
    background: red;
  }
</style>